module Page4.View exposing (..)
import Page4.Model as M
import Html as H
import Html.Attributes as A

type Msg =
  NoOp

view: M.Page -> H.Html Msg
view model =
  H.div 
    [ A.id "page4"
    , A.class "page"
    , A.class "slide" 
    ]
    [ H.div [] [H.text (.title model) ]
    , H.ul 
        [A.id "skills"] 
        (List.map skill (.skills model))]

skill: M.Skill -> H.Html Msg
skill s =
  H.li
    []
    [ H.div [] [H.text (.title s)]
    , H.ul [] (List.map item (.items s))]

item: M.Item -> H.Html Msg
item i =
  H.li
    []
    [ H.div [] [H.text (.name i)] 
    , H.div [] [H.text (toString (.star i))]]